#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

struct s{
    int a;
    int b;
    char c[1001];
    
    int sum(){
        return a+1;
    }
    int sum2(){
        if(b+b/5 <= 400){
            return b+b/5;
        }
        else{
            return 400;
        }

    }
    
}d[10000];
int n;
int main() {
    cin >> n;
    for(int i = 0; i < n; i++){
        scanf("%s %d %d",d[i].c,&d[i].a,&d[i].b);
    }
    for(int i = 0; i < n; i++){
        cout << d[i].c << ' ' << d[i].sum() << ' ' << d[i]. sum2() << endl;
    }

    return 0;
}
